<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean id="inhoud" scope="application" class="models.Bean" />   
<jsp:setProperty name="inhoud" property="language" value="<%= models.Bean.getLanguage()%>" />
<h1>
    <jsp:setProperty name="inhoud" property="key" value="ProfileOf" />
    <jsp:getProperty name="inhoud" property="key" />
    ${name}</h1>
<h2>
    <jsp:setProperty name="inhoud" property="key" value="YourData" />
    <jsp:getProperty name="inhoud" property="key" />
</h2>
<form action="/tutor" method="post">
    <table width="50%">
        <th colspan="2">
            <jsp:setProperty name="inhoud" property="key" value="AccountSettings" />
            <jsp:getProperty name="inhoud" property="key" />
        </th>
        <tr><td class="darker" style="width:150px"><b>
                    <jsp:setProperty name="inhoud" property="key" value="Username" />
                    <jsp:getProperty name="inhoud" property="key" />
                    :</b></td><td><input type="text" style="width:100%" required="required" name="username" value="${theUser.userName}"/></td></tr>
        <tr><td class="darker"><b>
                    <jsp:setProperty name="inhoud" property="key" value="Password" />
                    <jsp:getProperty name="inhoud" property="key" />
                    :</b></td><td><input type="text" required="required" style="width:100%" name="password" value="${theUser.passWord}"/></td></tr>
        <tr><td class="darker"><b>Email:</b></td><td><input required="required" type="text" style="width:100%" name="email" value="${theUser.email}"/></td></tr>
        <th colspan="2">
                <jsp:setProperty name="inhoud" property="key" value="PersonalSettings" />
                <jsp:getProperty name="inhoud" property="key" />
            </td></th>
        <tr><td class="darker"><b>
                    <jsp:setProperty name="inhoud" property="key" value="Name" />
                    <jsp:getProperty name="inhoud" property="key" />
                    :</b></td><td><input type="text" required="required" style="width:100%" name="firstname" value="${theUser.firstName}"/></td></tr>
        <tr><td class="darker"><b>
                    <jsp:setProperty name="inhoud" property="key" value="LastName" />
                    <jsp:getProperty name="inhoud" property="key" />
                    :</b></td><td><input type="text" required="required" style="width:100%" name="lastname" value="${theUser.lastName}"/></td></tr>
        <tr><td class="darker"><b>
                    <jsp:setProperty name="inhoud" property="key" value="Gender" />
                    <jsp:getProperty name="inhoud" property="key" />
                    :</b></td><td><input type="text" required="required" style="width:100%" name="gender" value="${theUser.gender}"/></td></tr>
        <tr><td class="darker"><b>
                    <jsp:setProperty name="inhoud" property="key" value="Address" />
                    <jsp:getProperty name="inhoud" property="key" />
                    :<b></td><td><input type="text" required="required" style="width:100%" name="address" value="${theUser.address}"/></td></tr>
                        <tr><td class="darker"><b>
                                    <jsp:setProperty name="inhoud" property="key" value="City" />
                                    <jsp:getProperty name="inhoud" property="key" />
                                    :</b></td><td><input type="text" required="required" style="width:100%" name="city" value="${theUser.city}"/></td></tr>
                        <tr><td class="darker"><b>
                                    <jsp:setProperty name="inhoud" property="key" value="Zipcode" />
                                    <jsp:getProperty name="inhoud" property="key" />
                                    :</b></td><td><input type="text" required="required" style="width:100%" name="zipcode" value="${theUser.zipCode}"/></td></tr>
                        <tr><td class="darker"><b>
                                    <jsp:setProperty name="inhoud" property="key" value="Country" />
                                    <jsp:getProperty name="inhoud" property="key" />
                                    :</b></td><td><select name="country" style="width:100%">                                    
                                    <c:forEach var="country" items="${countries}">
                                        <c:if test="${not empty country.displayCountry}">
                                            <c:choose>
                                                <c:when test="${country.displayCountry == theUser.country}">
                                                    <option selected="selected" value="${country.displayCountry}">${country.displayCountry}</option>
                                                </c:when>
                                                <c:otherwise>
                                                    <option value="${country.displayCountry}">${country.displayCountry}</option>
                                                </c:otherwise>
                                            </c:choose>
                                        </c:if>
                                    </c:forEach>

                                </select></td></tr>
                        <tr><td class="darker"><b>
                                    <jsp:setProperty name="inhoud" property="key" value="DateOfBirth" />
                                    <jsp:getProperty name="inhoud" property="key" />
                                    :</b></td><td><input type="text" required="required" style="width:100%" name="birthdate" value="${birthDate}"/></td></tr>
                        <tr><td class="darker"><b>
                                    <jsp:setProperty name="inhoud" property="key" value="PhoneNumber" />
                                    <jsp:getProperty name="inhoud" property="key" />
                                    :</b></td><td><input type="text" required="required" style="width:100%" name="phonenumber" value="${theUser.phoneNumber}"/></td></tr>
                        <input type="hidden" value="${theUser.userID}" required="required" name="id"/>
                        <tr class="darker"><td colspan="2"><input type="submit" value="submit"/></td></tr>
                        </table>
                        </form>